package com.easpeed.receiver

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.easpeed.SplashActivity
/**
 * Created by bigyu on 2024/11/27 17:26
 * com.easpeed.receiver
 */
class BootReceiver : BroadcastReceiver() {
    override fun onReceive(context: Context, intent: Intent) {
        if (intent.action == Intent.ACTION_BOOT_COMPLETED) {
            // 在这里启动服务或活动
            val launchIntent = Intent(context, SplashActivity::class.java)
            launchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
            context.startActivity(launchIntent)
        }
    }
}